package bigPack.service.impl;

import bigPack.dao.BookDao;
import bigPack.dao.impl.BookDaoIml;
import bigPack.pojo.Book;
import bigPack.service.BookService;

import java.util.List;

public class BookServiceIml implements BookService {

    private BookDao bookDao=new BookDaoIml();
    @Override
    public void addBook(Book book) {
        bookDao.addbook(book);
    }

    @Override
    public void deleteBookById(Integer id) {
        bookDao.deletBookById(id);
    }

    @Override
    public void updateBook(Book book) {
        bookDao.updateBook(book);
    }

    @Override
    public Book queryBookById(Integer id) {
        return bookDao.queryBookById(id);
    }

    @Override
    public List<Book> queryBooks() {
        return bookDao.queryBooks();
    }
}
